package PTA_JAVA.Exception6.demo6;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n];
        int yes=0;
        int no=0;
        for (int i = 0; i < n; i++) {
            int q = sc.nextInt();
            try {
                isLegal(q);
                arr[i]=q;
                if(q>=60 && q<=100){
                    yes++;
                }else if(q>=0 && q<60){
                    no++;
                }
            } catch (Exception e) {
                System.out.println(e.getMessage());
                --i;
            }
        }
        System.out.println(yes+"\n"+no);
    }

    private static void isLegal(int q) throws Exception{
        if(q<0 || q>100 ){
            throw new Exception(q+"invalid!");
        }
    }
}
